<!--主页管理模块-->
<template>
  <div class="dashboard-container">
    <div class="header">
      <h1 class="title">欢迎进入矿山管理系统</h1>
      <div class="sub-title">请选择要操作的管理模块</div>
    </div>

    <div class="module-wrapper">
      <ul class="module-list">
        <!-- 孔位管理 -->
        <li class="module-item" @click="navigateTo('/role')">
          <div class="card-content">
            <i class="el-icon-location-outline module-icon"></i>
            <h3 class="module-title">孔位管理</h3>
            <div class="module-desc">钻孔位置信息管理与维护</div>
          </div>
          <div class="card-actions">
            <el-button type="text" class="enter-btn">进入管理 →</el-button>
          </div>
        </li>

        <!-- 历史水位管理 -->
        <li class="module-item" @click="navigateTo('/permission')">
          <div class="card-content">
            <i class="el-icon-data-analysis module-icon"></i>
            <h3 class="module-title">历史水位管理</h3>
            <div class="module-desc">水位历史数据查询与分析</div>
          </div>
          <div class="card-actions">
            <el-button type="text" class="enter-btn">进入管理 →</el-button>
          </div>
        </li>

        <!-- 遥感图片管理 -->
        <li class="module-item" @click="navigateTo('/salary')">
          <div class="card-content">
            <i class="el-icon-picture-outline module-icon"></i>
            <h3 class="module-title">遥感图片管理</h3>
            <div class="module-desc">卫星遥感影像数据管理</div>
          </div>
          <div class="card-actions">
            <el-button type="text" class="enter-btn">进入管理 →</el-button>
          </div>
        </li>

        <!-- 无人机作业管理 -->
        <li class="module-item" @click="navigateTo('/social')">
          <div class="card-content">
            <i class="el-icon-guide module-icon"></i>
            <h3 class="module-title">无人机作业管理</h3>
            <div class="module-desc">无人机巡检任务管理</div>
          </div>
          <div class="card-actions">
            <el-button type="text" class="enter-btn">进入管理 →</el-button>
          </div>
        </li>

        <!-- 预警信息管理 -->
        <li class="module-item" @click="navigateTo('/attendance')">
          <div class="card-content">
            <i class="el-icon-warning-outline module-icon"></i>
            <h3 class="module-title">预警信息管理</h3>
            <div class="module-desc">安全预警信息处理跟踪</div>
          </div>
          <div class="card-actions">
            <el-button type="text" class="enter-btn">进入管理 →</el-button>
          </div>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    navigateTo(path) {
      this.$router.push(path)
    }
  }
}
</script>

<style scoped>
.dashboard-container {
  padding: 20px;
  background: #f0f2f5;
  min-height: calc(100vh - 50px);
}

.header {
  text-align: center;
  margin-bottom: 40px;
}

.title {
  color: #303133;
  font-size: 28px;
  margin-bottom: 8px;
}

.sub-title {
  color: #909399;
  font-size: 14px;
}

.module-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  padding: 0;
  margin: 0;
}

.module-item {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  list-style: none;
  border: 1px solid #ebeef5;
}

.module-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px 0 rgba(0,0,0,0.08);
}

.module-icon {
  font-size: 40px;
  color: #409EFF;
  margin-bottom: 16px;
}

.module-title {
  color: #303133;
  margin: 0 0 8px 0;
  font-size: 18px;
}

.module-desc {
  color: #909399;
  font-size: 14px;
  line-height: 1.5;
  min-height: 40px;
}

.card-actions {
  border-top: 1px solid #ebeef5;
  padding-top: 16px;
  margin-top: 16px;
  text-align: right;
}

.enter-btn {
  color: #409EFF !important;
  font-size: 14px;
  padding: 8px 0 !important;
}

.enter-btn:hover {
  color: #66b1ff !important;
}
</style>
